
#pragma once

#include "stdafx.h"

class Effect
{
public:
	Effect ( LPCWSTR path, ID3D10Device & rDevice )
	{
		HRESULT hResult = S_OK;
		D3DX10CreateEffectFromFile( path, NULL, NULL, "fx_4_0", D3D10_SHADER_ENABLE_STRICTNESS, 0, &rDevice, NULL, NULL, &pEffect, NULL, &hResult );
		if( FAILED(hResult) )
		{
			// ERROR
			pEffect = NULL;
			printf("ERROR!");
		}
	}

	~Effect()
	{
		if(pEffect)
		{
			pEffect->Release();
			pEffect = NULL;
		}
	}

	ID3D10Effect * pEffect;
};
